package com.fang.security.common;

/**
 * @Description
 * @Author Bernie
 * @Date 2024/4/3 10:40
 **/
public class CommonConstants {

    public static class JWTConstants {
        /**
         * 2个小时过期时间
         */
        public static final long EXPIRATION_TIME_MILLISECOND = 1000 * 60 * 60 * 2;
        /**
         * 剩余半个小时过期时间
         */
        public static final long RESIDUE_EXPIRATION_TIME_MILLISECOND = 1000 * 60 * 30;
        public static final String USERNAME = "USERNAME";
        public static final String USERID = "USERID";
        public static final String ROLES = "ROLES";
    }

    public static class CommonRequest {
        public static final String AUTHORIZATION = "Authorization";
    }

    public static class CommonResponse {
        public static final String JSON_U8_CONTENT_TYPE = "text/json;charset=utf-8";
    }

    public static class Role {
        public static final String NAME_PREFIX = "ROLE_";
    }

}
